package com.ws.util;

import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.read.listener.ReadListener;
import com.ws.bean.Aceshi;

public class AceshiExcelListener implements ReadListener<Aceshi>{

	/*
	 * 读取到每一个对象都会调用invoke
	 */
	@Override
	public void invoke(Aceshi data, AnalysisContext context) {
		System.out.println(data);
		
	}
/*
 * 所有的事情都干完以后执行的方法
 */
	@Override
	public void doAfterAllAnalysed(AnalysisContext context) {
		System.out.println("读取完毕");
		
	}
//测试
	public static void main(String[] args) {
		EasyExcel.read("C:\\wsyexecl\\ws.xlsx",Aceshi.class,new AceshiExcelListener()).sheet(0).doRead();
		
	}
	
}
